/*
 *  Copyright (C) 2005-2007 Renier Roth
 *  www.renier.de
 *
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU General Public License
 *  as published by the Free Software Foundation; either version 2
 *  of the License, or any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
package de.renier.jkeepass.elements;

import java.util.Date;

import de.renier.jkeepass.util.IconPool;

/**
 * BasicElement
 *
 * @author <a href="mailto:software@renier.de">Renier Roth</a>
 */
public class BasicElement implements Element {
  
  private static final long serialVersionUID = -2708382008925741852L;
  private String name;
  private String symbol;
  private String user;
  private String password;
  private String url;
  private String comment;
  private Date expire;
  
  /**
   * Constructor for BasicElement
   *
   * @param name
   */
  public BasicElement(String name, String symbol) {
    this.name = name;
    this.symbol = symbol;
  }

  /* (non-Javadoc)
   * @see de.renier.jkeepass.elements.Element#getName()
   */
  public String getName() {
    return this.name;
  }

  /*
   * (non-Javadoc)
   * @see de.renier.jkeepass.elements.Element#getSymbol()
   */
  public String getSymbol() {
    if (this.symbol == null) return IconPool.DEFAULT_ELEMENT_ID;
    return this.symbol;
  }

  /**
   * getComment
   *
   * @return Returns the comment.
   */
  public String getComment() {
    return comment;
  }

  /**
   * setComment
   *
   * @param comment The comment to set.
   */
  public void setComment(String comment) {
    this.comment = comment;
  }

  /**
   * getExpire
   *
   * @return Returns the expire.
   */
  public Date getExpire() {
    return expire;
  }

  /**
   * setExpire
   *
   * @param expire The expire to set.
   */
  public void setExpire(Date expire) {
    this.expire = expire;
  }

  /**
   * getPassword
   *
   * @return Returns the password.
   */
  public String getPassword() {
    return password;
  }

  /**
   * setPassword
   *
   * @param password The password to set.
   */
  public void setPassword(String password) {
    this.password = password;
  }

  /**
   * getUrl
   *
   * @return Returns the url.
   */
  public String getUrl() {
    return url;
  }

  /**
   * setUrl
   *
   * @param url The url to set.
   */
  public void setUrl(String url) {
    this.url = url;
  }

  /**
   * getUser
   *
   * @return Returns the user.
   */
  public String getUser() {
    return user;
  }

  /**
   * setUser
   *
   * @param user The user to set.
   */
  public void setUser(String user) {
    this.user = user;
  }

  /**
   * setName
   *
   * @param name The name to set.
   */
  public void setName(String name) {
    this.name = name;
  }

  /**
   * setSymbol
   *
   * @param symbol The symbol to set.
   */
  public void setSymbol(String symbol) {
    this.symbol = symbol;
  }

}
